<div class="full-screen">
    <header>
    <div class="a-bar">
        <a href="javascript:history.back()" class="a-back">
            <i class="arr left"></i>
            返回
        </a>
        <div class="a-name">
            我的订单
        </div>
    </div>
    </header>
    <div class="section">
        <div class="col2">
        <{if $order.payinfo.pay_app_id != '-1'}>
          <{if ($order.pay_status == '0' || $order.pay_status == '3') && $order.status != 'dead' && $order.status != 'finish'}>
            <div class="col">
               <{if $order.is_pay == 0}>
              <a href="<{link app=b2c ctl=wap_paycenter act=index arg0=$order.order_id}>">
                更改付款方式
                <i class="arr right"></i>
              </a>
              <{/if}>
            </div>

            <div class="col">
            <{if $order.payinfo.pay_app_id != 'offline'}>
                <{if $prepare.prepare_type != 'prepare' && $order.is_pay == 0}>
                      <a href="<{link app=b2c ctl=wap_paycenter act=index arg0=$order.order_id}>">
                        去付款
                        <i class="arr right"></i>
                      </a>
                <{/if}>
                <{if $prepare.prepare_type == 'prepare' && $prepare.nowtime > $prepare.begin_time && $prepare.nowtime < $prepare.end_time  && $order.pay_status=='0' && $prepare.status=='true' && $order.is_pay == 0}>
                      <a href="<{link app=b2c ctl=wap_paycenter act=index arg0=$order.order_id}>">
                        去付订金
                        <i class="arr right"></i>
                      </a>
                <{/if}>
                <{if $prepare.prepare_type == 'prepare'&& $prepare.nowtime > $prepare.begin_time && $prepare.nowtime < $prepare.begin_time_final  && $order.pay_status=='3' && $prepare.status=='true'}>
                        等待支付尾款
                        <i class="arr right"></i>
                <{/if}>
                <{if $prepare.prepare_type == 'prepare'&& $prepare.nowtime > $prepare.begin_time_final && $prepare.nowtime < $prepare.end_time_final  && $order.pay_status=='3' && $prepare.status=='true' &&  $order.is_pay == 0}>
                        支付尾款
                        <i class="arr right"></i>
                <{/if}>
                <{if $prepare.prepare_type == 'prepare'&& $prepare.nowtime > $prepare.end_time_final && $prepare.status=='true'}>
                        活动结束
                        <i class="arr right"></i>
                <{/if}>

            <{else}>
              <a href="<{link app=b2c ctl='wap_member' act='add_order_msg' arg0=$order.order_id arg1='1'}>">
                我已经付款
                <i class="arr right"></i>
              </a>
            <{/if}>
            </div>
          <{/if}>
        <{/if}>
        </div>
    </div>

    <!-- 订单留言 -->
    <{if $ordermsg}>
    <div class="section">
        <div class="d-line c-fix">
            <span class="l-k">付款信息：</span>
            <{foreach from=$ordermsg item=msgitem name="ordermsg"}>
            <span class="l-v">
            <span class="bold">
            <{$msgitem.title}>:<{$msgitem.time|cdate:FDATE_STIME}>
            </span>
            <br />
            （<{$msgitem.comment|nl2br}>）
            </span>
            <{/foreach}>
        </div>
    </div>
    <{/if}>

    <div class="section">
        <div class="d-line c-fix">
            <span class="l-k">订单号：</span>
            <span class="l-v"><{$order.order_id}></span>

            <span class="l-k">总金额：</span>
            <span class="l-v"><{$order.total_amount|cur_odr:$order.currency}></span>

            <span class="l-k">订单状态：</span>
            <span class="l-v"><{if $order.status == 'dead'}><{t}>已作废<{/t}><{elseif $order.status == 'finish'}><{t}>已完成<{/t}><{else}><{if $order.pay_status == '0'}><{t}>未付款<{/t}><{elseif $order.pay_status == '1'}><{t}>已支付<{/t}><{elseif $order.pay_status == '2'}><{t}>已付款至担保方<{/t}><{elseif $order.pay_status == '3'}><{t}>部分付款<{/t}><{elseif $order.pay_status == '4'}><{t}>部分退款<{/t}><{else}><{t}>全额退款<{/t}><{/if}> <{if $order.ship_status == '0'}><{t}>[未发货]<{/t}><{elseif $order.ship_status == '1'}><{t}>已发货<{/t}><{elseif $order.ship_status == '2'}><{t}>部分发货<{/t}><{elseif $order.ship_status == '3'}><{t}>部分退货<{/t}><{else}><{t}>已退货<{/t}><{/if}><{/if}></span>

            <span class="l-k">下单日期：</span>
            <span class="l-v"><{$order.createtime|cdate}></span>
        </div>
    </div>
    <div class="section">
        <div class="d-line c-fix">
            <span class="l-k">配送地区：</span>
            <span class="l-v"><{$order.consignee.area}></span>

            <span class="l-k">收货地址：</span>
            <span class="l-v"><{$order.consignee.addr}>,<{$order.consignee.zip}>,<{$order.consignee.name}>,<{if $order.consignee.telephone}><{$order.consignee.telephone}><{if $order.consignee.mobile}> | <{/if}><{/if}><{$order.consignee.mobile}></span>
        </div>
    </div>
    <div class="section">
        <div class="pre ob">
            <div class="d-line c-fix" id="L_sel_pre">
                    <div class="col2">
                        <div class="col">配送方式：<{$order.shipping.shipping_name}></div>
                        <div class="col">运费<span class="f-red"><{$order.shipping.cost_shipping|cur_odr:$order.currency}></span>元</div>
                        <{if $logi == true &&($order.ship_status == '1' ||$order.ship_status == '2')}>
                        <div class="colt-r"><i class="arr down"></i></div>
                        <{/if}>
                    </div>
            </div>
            <div class="pre-info hide" id="L_pre_info">
            <{if $orderlogs}>
            <{include file="wap/member/order_logs.html" app="b2c"}>
            <{/if}>
            </div>
        </div>
    </div>

      <{if $is_minfo ==1}>
      <!-- 商品必填项信息 -->
      <div id="order_payment" class="section">
        <!-- <div class="d-line"><span class="k"><{t}>购物必填信息：<{/t}></span></div> -->
        <div class="d-line c-fix">
            <{foreach from=$minfo  item="minfo"}>
                <p style="text-align:left;">购物  <{t}><{$minfo.name}> x <{$minfo.quantity}><{/t}> 时必填信息</p><span style="float:left;"><{t}>购物必填信息：<{/t}></span>
                <{foreach from=$minfo.minfo  item="minfo_info"}>
                <div class="wap" style="margin-left:90px;">
                    <span class="l-k"><{t}><{$minfo_info.label}><{/t}>：</span>
                    <span class='l-v'><{$minfo_info.value}></span>
                </div>

                 <{/foreach}> 
              <{/foreach}>
            </tbody>
          </table>
        </div>
      </div>
      <{/if}>

      
    <div class="section">
        <div class="d-line c-fix">
            <span class="l-k">支付方式：</span>
            <span class="l-v"><{$order.payinfo.pay_app_id|pay_name}></span>
        </div>
    </div>
    <div class="section">
        <div class="d-line">
            <span class="k">商品清单：</span>
        </div>
        <{if $prepare.prepare_type != 'prepare'}>
            <div class="pre ob">
                <div class="d-line c-fix" id="J_sel_pre">
                    优惠：
                    <span class="pre-list">
                        <{foreach from=$order.order_pmt item=item}>
                        <span class="icon red">
                            <{$item.pmt_tag}>
                        </span>
                        <{/foreach}>
                        <{foreach from=$order.goods_pmt item=item}>
                        <{foreach from=$item item=goodpro}>
                        <span class="icon red">
                            <{$goodpro.pmt_tag}>
                        </span>
                        <{/foreach}>
                        <{/foreach}>
                    </span>
                    <i class="arr down"></i>
                </div>
                <div class="pre-info hide" id="J_pre_info">
                    <{if count($order.order_pmt)>0}>
                    <div class="pre-type">订单优惠</div>
                    <div class="box">
                        <{foreach from=$order.order_pmt item=item}>
                        <span class="col f-red">[<{$item.pmt_tag}>]</span>
                        <span class="col"><{$item.pmt_describe}></span>
                        <{/foreach}>
                    </div>
                    <{/if}>
                    <{if count($order.goods_pmt)>0}>
                    <div class="pre-type">商品优惠</div>
                    <div class="box">
                        <{foreach from=$order.goods_pmt item=item}>
                        <{foreach from=$item item=goodpro}>
                        <span class="col f-red">[<{$goodpro.pmt_tag}>]</span>
                        <span class="col"><{$goodpro.pmt_describe}></span>
                        <{/foreach}>
                        <{/foreach}>
                    </div>
                    <{/if}>
                </div>
            </div>
        <{/if}>

<{if count($order.goods_items) > 0}>
<{foreach from=$order.goods_items item=goods name="order_items"}>
<!-- 商品 -->
<{if $goods.product}>
<ul class="pt-list">
    <li class="pt-h-item c-fix">
    <a href="<{$goods.product.link_url}>" class="pt-h-link">
        <div class="pt-h-img"><img src="<{$goods.product.thumbnail_pic|default:$env.conf.site.default_thumbnail_pic|storager:'s'}>" /></div>
        <div class="pt-h-info">
            <div class="pt-h-name">
                <{$goods.product.name}>
            </div>
            <div class="pt-h-other">
                <{if $goods.product.attr}>
                    <{$goods.product.attr}>
                <{/if}>
            </div>
            <div class="col2">
                <div class="col price">
                    <{$goods.product.amount|cur_odr:$order.currency}>
                </div>
                <div class="col t-r">
                    数量：<{$goods.product.quantity}>
                </div>
            </div>
        </div>
    </a>
    </li>
</ul>
<{/if}>

<!-- 配件 -->
<{if $goods.adjunct_items}>
<{foreach from=$goods.adjunct_items item=ajuncts name="ajunctsItem"}>
<ul class="pt-list">
    <li class="pt-h-item c-fix">
    <a href="<{$ajuncts.link_url}>" class="pt-h-link">
        <div class="pt-h-img"><img src="<{$ajuncts.thumbnail_pic|default:$env.conf.site.default_thumbnail_pic|storager:'s'}>" /></div>
        <div class="pt-h-info">
            <div class="pt-h-name">
                <{$ajuncts.name}>
            </div>
            <div class="pt-h-other">
                <{if $ajuncts.attr}>
                    <{$ajuncts.attr}>
                <{/if}>
            </div>
            <div class="col2">
                <div class="col price">
                    <{$ajuncts.amount|cur_odr:$order.currency}>
                </div>
                <div class="col t-r">
                    数量：<{$ajuncts.quantity}>
                </div>
            </div>
        </div>
    </a>
    </li>
</ul>
<{/foreach}>
<{/if}>

<{if $prepare.prepare_type != 'prepare'}>
<!-- 赠送赠品 -->
<{if $goods.gift_items}>
<{foreach from=$goods.gift_items item=gifts name="giftsItem"}>
<ul class="pt-list">
    <li class="pt-h-item c-fix">
    <a href="#" class="pt-h-link">
        <div class="pt-h-img"><img src="<{$gifts.thumbnail_pic|default:$env.conf.site.default_thumbnail_pic|storager:'s'}>" /></div>
        <div class="pt-h-info">
            <div class="pt-h-name">
                <{$gifts.name}>
            </div>
            <div class="pt-h-other">
                <{if $gifts.attr}>
                    <{$gifts.attr}>
                <{/if}>
            </div>
            <div class="col2">
                <div class="col price">
                    商品赠送
                </div>
                <div class="col t-r">
                    数量：<{$gifts.quantity}>
                </div>
            </div>
        </div>
    </a>
    </li>
</ul>
<{/foreach}>
<{/if}>
<{/if}>

<{/foreach}>
<{/if}>


<{if $prepare.prepare_type != 'prepare'}>
<!-- 赠品 -->
<{if $order.gift_items}>
<{foreach from=$order.gift_items item="item" key="key"}>
<ul class="pt-list">
    <li class="pt-h-item c-fix">
    <a href="#" class="pt-h-link">
        <div class="pt-h-img"><img src="<{$item.thumbnail_pic|default:$env.conf.site.default_thumbnail_pic|storager:'s'}>" /></div>
        <div class="pt-h-info">
            <div class="pt-h-name">
                <{$item.name}>
            </div>
            <div class="pt-h-other">
                
            </div>
            <div class="col2">
                <div class="col price">
                    <{$item.amount|cur_odr:$order.currency}>
                </div>
                <div class="col t-r">
                    数量：<{$item.nums}>
                </div>
            </div>
        </div>
    </a>
    </li>
</ul>
<{/foreach}>
<{/if}>
<{/if}>

<!-- 其他 -->
<{if $order.extends_items}>
<{if count($order.goods_items) <= 0}>
<{foreach from=$order.extends_items item="aExtends"}>
    <{$aExtends}>
<{/foreach}>
<{/if}>
<{/if}>

    </div>
    <div class="section">
        <div class="d-line c-fix">
            <span class="l-k">订单留言：</span>
            <span class="l-v">
                <{if $order.memo}>
                <{$order.memo}>
                <{else}>
                无
                <{/if}>
            </span>
        </div>
    </div>
    <div class="section">
        <div class="d-line">
            <span class="k">
                商品总金额：
            </span>
            <span class="v">
                <div class="price">
                    <{$order.cost_item|cur_odr:$order.currency}>
                </div>
            </span>
        </div>
        <div class="d-line">
            <span class="k">
                运费：
            </span>
            <span class="v">
                <div class="price">
                    <{$order.shipping.cost_shipping|cur_odr:$order.currency}>
                </div>
            </span>
        </div>
        <{if $order.order_chgpointmoney}>
        <div class="d-line">
            <span class="k">
                积分抵扣金额：
            </span>
            <span class="v">
                <div class="price">
                    <{$order.order_chgpointmoney|cur_odr:$order.currency}>
                </div>
            </span>
        </div>
        <{/if}>
        <div class="d-line">
            <span class="k">
                订单优惠金额：
            </span>
            <span class="v">
                <div class="price">
                    -<{$order.pmt_order|cur_odr:$order.currency}>
                </div>
            </span>
        </div>
        <div class="d-line total">
            <span class="k">
                总金额：
            </span>
            <span class="v">
                <div class="price">
                    <{$order.total_amount|cur_odr:$order.currency}>
                </div>
            </span>
        </div>
    </div>
</div>
<script>
    (function(){
        $('#J_sel_pre').bind('click',function(e){
            $('#J_pre_info').toggleClass('hide');
            $(this).find('.pre-list').toggleClass('hide');
        });
        <{if $order.ship_status == '1' ||$order.ship_status == '2'}>
            $('#L_sel_pre').bind('click',function(e){
            $('#L_pre_info').toggleClass('hide');                                    
           
            });
        <{/if}>
    })();
</script>
